package org.xzx.cloud.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.xzx.cloud.entity.CouponTemplate;

import java.util.List;

/**
 * CouponTemplate Dao
 */
public interface CouponTemplateDao extends JpaRepository<CouponTemplate, Integer> {

    CouponTemplate findByName(String name);

    List<CouponTemplate> findAllByAvailableAndExpired(Boolean available, Boolean expired);

    List<CouponTemplate> findAllByExpired(Boolean expired);
}
